/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author submonkey
 */
@Entity
@Table(name = "stock_month")
@NamedQueries({@NamedQuery(name = "StockMonth.findAll", query = "SELECT s FROM StockMonth s"), @NamedQuery(name = "StockMonth.findById", query = "SELECT s FROM StockMonth s WHERE s.id = :id"), @NamedQuery(name = "StockMonth.findByBulan", query = "SELECT s FROM StockMonth s WHERE s.bulan = :bulan"), @NamedQuery(name = "StockMonth.findByPlanStock", query = "SELECT s FROM StockMonth s WHERE s.planStock = :planStock"), @NamedQuery(name = "StockMonth.findByStockActual", query = "SELECT s FROM StockMonth s WHERE s.stockActual = :stockActual")})
public class StockMonth implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "bulan")
    private String bulan;
    @Basic(optional = false)
    @Column(name = "plan_stock")
    private double planStock;
    @Basic(optional = false)
    @Column(name = "stock_actual")
    private double stockActual;

    public StockMonth() {
    }

    public StockMonth(Integer id) {
        this.id = id;
    }

    public StockMonth(Integer id, String bulan, double planStock, double stockActual) {
        this.id = id;
        this.bulan = bulan;
        this.planStock = planStock;
        this.stockActual = stockActual;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBulan() {
        return bulan;
    }

    public void setBulan(String bulan) {
        this.bulan = bulan;
    }

    public double getPlanStock() {
        return planStock;
    }

    public void setPlanStock(double planStock) {
        this.planStock = planStock;
    }

    public double getStockActual() {
        return stockActual;
    }

    public void setStockActual(double stockActual) {
        this.stockActual = stockActual;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StockMonth)) {
            return false;
        }
        StockMonth other = (StockMonth) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.StockMonth[id=" + id + "]";
    }

}
